package com.elock.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.elock.base.core.entity.BaseEntity;

/**
 * Entity - 锁
 * @author 仁德
 */
@Entity
@Table(name = "elock")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "elock_sequence")
public class Elock extends BaseEntity {

	private static final long serialVersionUID = 1386745660360951034L;

	/** 锁编号*/
	private String elockNum;

	/** 锁名称 */
	private String elockName;

	/** 备注 */
	private String remark;

	/** 锁 密钥 */
	private String secretKey;

	/** 类型  */
	private SystemDict type;

	/** 型号  */
	private SystemDict model;

//	/** 版本号 */
//	private String edition;

	/**  
	 * 获取elockNum  
	 * @return elockNum elockNum  
	 */
	@Column(unique = true)
	public String getElockNum() {
		return elockNum;
	}

	/**  
	 * 设置elockNum  
	 * @param elockNum elockNum  
	 */
	public void setElockNum(String elockNum) {
		this.elockNum = elockNum;
	}

	/**  
	 * 获取elockName  
	 * @return elockName elockName  
	 */
	public String getElockName() {
		return elockName;
	}

	/**  
	 * 设置elockName  
	 * @param elockName elockName  
	 */
	public void setElockName(String elockName) {
		this.elockName = elockName;
	}

	/**  
	 * 获取remark  
	 * @return remark remark  
	 */
	public String getRemark() {
		return remark;
	}

	/**  
	 * 设置remark  
	 * @param remark remark  
	 */
	public void setRemark(String remark) {
		this.remark = remark;
	}

	/**  
	 * 获取secretKey  
	 * @return secretKey secretKey  
	 */
	public String getSecretKey() {
		return secretKey;
	}

	/**  
	 * 设置secretKey  
	 * @param secretKey secretKey  
	 */
	public void setSecretKey(String secretKey) {
		this.secretKey = secretKey;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	public SystemDict getType() {
		return type;
	}

	public void setType(SystemDict type) {
		this.type = type;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	public SystemDict getModel() {
		return model;
	}

	public void setModel(SystemDict model) {
		this.model = model;
	}

//	public String getEdition() {
//		return edition;
//	}
//	
//
//	public void setEdition(String edition) {
//		this.edition = edition;
//	}

}
